package com.ruoyi.im.service.impl;

import com.ruoyi.common.support.Convert;
import com.ruoyi.im.domain.AnExcuse;
import com.ruoyi.im.mapper.AnExcuseMapper;
import com.ruoyi.im.service.IAnExcuseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 禁言 服务层实现
 * 
 * @author lxs
 * @date 2018-11-12
 */
@Service
public class AnExcuseServiceImpl implements IAnExcuseService 
{
	@Autowired
	private AnExcuseMapper anExcuseMapper;

	/**
     * 查询禁言信息
     * 
     * @param id 禁言ID
     * @return 禁言信息
     */
    @Override
	public AnExcuse selectAnExcuseById(Long id)
	{
	    return anExcuseMapper.selectAnExcuseById(id);
	}
	
	/**
     * 查询禁言列表
     * 
     * @param anExcuse 禁言信息
     * @return 禁言集合
     */
	@Override
	public List<AnExcuse> selectAnExcuseList(AnExcuse anExcuse)
	{
	    return anExcuseMapper.selectAnExcuseList(anExcuse);
	}
	
    /**
     * 新增禁言
     * 
     * @param anExcuse 禁言信息
     * @return 结果
     */
	@Override
	public int insertAnExcuse(AnExcuse anExcuse)
	{
	    return anExcuseMapper.insertAnExcuse(anExcuse);
	}
	
	/**
     * 修改禁言
     * 
     * @param anExcuse 禁言信息
     * @return 结果
     */
	@Override
	public int updateAnExcuse(AnExcuse anExcuse)
	{
	    return anExcuseMapper.updateAnExcuse(anExcuse);
	}

	/**
     * 删除禁言对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteAnExcuseByIds(String ids)
	{
		return anExcuseMapper.deleteAnExcuseByIds(Convert.toStrArray(ids));
	}
	
}
